Skip to content

Restrict nomination edits to editable windows#2992

Open
vandit98 wants to merge 1 commit intopython:mainfrom
vandit98:vandit98/2991-nomination-edit-permissions
Open

Restrict nomination edits to editable windows#2992
vandit98 wants to merge 1 commit intopython:mainfrom
vandit98:vandit98/2991-nomination-edit-permissions

Conversation

@vandit98
Copy link
Copy Markdown

@vandit98 vandit98 commented May 5, 2026

Fixes #2991.

Summary

  • Require nomination edit requests to pass the model's editable() rule in addition to the nominator ownership check.
  • Require nomination accept requests to come from the nominee and remain within the editable nomination window.
  • Add focused tests for open, closed, accepted, nominee, and nominator permission cases.

Testing

  • DATABASE_URL="sqlite:///:memory:" /Users/vandit/Documents/Codex/2026-05-06/hey-i-need-you-to-run/.tools/uv run --group dev ./manage.py test apps.nominations.tests --verbosity 2
  • /Users/vandit/Documents/Codex/2026-05-06/hey-i-need-you-to-run/.tools/uv run --group dev ruff check apps/nominations/views.py apps/nominations/tests.py
  • /Users/vandit/Documents/Codex/2026-05-06/hey-i-need-you-to-run/.tools/uv run --group dev ruff format --check apps/nominations/views.py apps/nominations/tests.py
  • DATABASE_URL="sqlite:///:memory:" /Users/vandit/Documents/Codex/2026-05-06/hey-i-need-you-to-run/.tools/uv run --group dev ./manage.py makemigrations --check --dry-run
  • git diff --check

@vandit98 vandit98 requested a review from JacobCoffee as a code owner May 5, 2026 23:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Nominations can still be edited after the nomination window closes

1 participant